package com.lyt.springboot.designPattern.templatePattern;

public class TemplateMethodDemo {
    public static void main(String[] args) {
        Payment creditCardPayment = new CreditCardPayment();
        System.out.println("--- Credit Card Payment ---");
        creditCardPayment.pay();

        Payment alipayPayment = new AlipayPayment();
        System.out.println("--- Alipay Payment ---");
        alipayPayment.pay();
    }
}